package com.mijie.homi.dao.notify;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.mijie.core.IBatisDao;
import com.mijie.homi.common.domain.PushMessage;

@Repository
public class PushDao extends IBatisDao {

	public int addToPushQueue(PushMessage message){
		return this.insert("addToPushQueue", message);
	}
	
	public int batchAddToPushQueue(List<PushMessage> list){
		if(list==null || list.isEmpty()) return 0;
		return this.insert("batchAddToPushQueue",list);
	}
	
	public List<PushMessage> listPushMessage(int size){
		return this.selectList("listPushMessage", size);
	}
	
	public int deletePushMessages(String id){
		return this.delete("deletePushMessages", id);
	}
}
